package com.ruoyi.system.controller;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.procurementmanagement.domain.ErpGoods;
import com.ruoyi.system.domain.ErpStatistics;
import com.ruoyi.system.service.IErpStatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 库存统计Controller
 *
 * @author ruoyi
 * @date 2025-03-12
 */
@RestController
@RequestMapping("/system/statistics")
public class ErpStatisticsController extends BaseController {
        @Autowired
        private IErpStatisticsService erpStatisticsService;
        /**
         * 查询商品列表
         */
        @PreAuthorize("@ss.hasPermi('system:statistics:list')")
        @GetMapping("/list")
        public TableDataInfo list(@RequestParam(defaultValue = "1") int pageNum,
                                  @RequestParam(defaultValue = "10") int pageSize,
                                  ErpStatistics erpStatistics) {
            PageHelper.startPage(pageNum, pageSize);
            List<ErpStatistics> list = erpStatisticsService.selectErpStatisticsList(erpStatistics);
            return getDataTable(list);
        }
}
